package com.wumart.scaffold.web.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wumart.scaffold.web.entity.g6.LoanCredit;
import com.wumart.scaffold.web.mapper.master.CashRecordInfoMapper;
import com.wumart.scaffold.web.service.g6.impl.LoanCreditServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangwc@wumart.com
 * @since 2021-01-21
 */
@RestController
@RequestMapping("/web/loanCredit")
public class LoanCreditController {

    @Autowired
    private CashRecordInfoMapper cashRecordInfoMapper;
    @Autowired
    private LoanCreditServiceImpl loanCreditService;

    @RequestMapping("/demo")
    public List<LoanCredit> contextLoads() {
        List<LoanCredit> loanCreditList = loanCreditService.list();
        IPage<LoanCredit> userPage = new Page<>(1, 2);
        userPage = loanCreditService.page(userPage);
        return userPage.getRecords();
    }
}

